﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using Cole.Entities;
using Cole.Service;

namespace Cole.GUI
{
    public partial class RegistrarAlumno : Form
    {
        private IAlumnoBl alumnoBl;
        public RegistrarAlumno()
        {
            InitializeComponent();
            if (alumnoBl == null)
            {
                alumnoBl = new AlumnoBl();
            }
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            /*
            var rpt = MessageBox.Show(this, "Cancelar:  " + "Mensaje",
                      MessageBoxButtons.YesNo,
                      MessageBoxIcon.Question);
            if (rpt == DialogResult.Yes)
            {
                Close();
            }*/
            Close();
        }
        public void nuevo()
        {
            alumnoBindingSource.AddNew();
        }

        private void btnGuardar_Click(object sender, EventArgs e)
        {
            var alumno = alumnoBindingSource.Current as Alumno;
            alumnoBl.ModificarAlumno(alumno);
        }

        private void nroDniLabel_Click(object sender, EventArgs e)
        {

        }

        private void nroDniTextBox_TextChanged(object sender, EventArgs e)
        {

        }

        private void RegistrarAlumno_Load(object sender, EventArgs e)
        {

        }
    }
}
